package com.ctyun.xstore.vod.template.model;

import java.util.EnumSet;
import java.util.Set;

public class TemplateEnums {

	public enum TemplateTypeEnum {
		SYS("系统模板"), USER("用户自定义模板");

		private final String des;

		private TemplateTypeEnum(String des) {
			this.des = des;
		}

		public String getDes() {
			return des;
		}
	}
	
	public enum TemplateFormatEnum {
		MP4("mp4"), MKV("mkv"), 
		HLS("hls"), FLV("flv"),
		MP3("mp3"), M4A("m4a"), 
		OGG("ogg"), G3P("3gp"), 
		WAV("wav"), TS("ts");
		
		private final String format;
		
		private TemplateFormatEnum(String format) {
			this.format = format;
		}

		public String getFormat() {
			return format;
		}
	}
	
	public enum VideoFormatEnum {
		MP4("mp4"), MKV("mkv"), 
		HLS("hls"), FLV("flv"), 
		G3P("3gp");
		
		private final String format;
		
		private VideoFormatEnum(String format) {
			this.format = format;
		}

		public String getFormat() {
			return format;
		}
	}
	
	public enum AudioFormatEnum {
		MP3("mp3", EnumSet.of(AudioCodecEnum.MP3)), 
		M4A("m4a", EnumSet.of(AudioCodecEnum.AAC)), 
		OGG("ogg", EnumSet.of(AudioCodecEnum.VORBIS, AudioCodecEnum.FLAC)), 
		WAV("wav", EnumSet.of(AudioCodecEnum.PCM_S16LE, AudioCodecEnum.MP3, AudioCodecEnum.AAC, AudioCodecEnum.PCM_ALAW, AudioCodecEnum.AMRWB));
		
		private final String format;
		private final Set<AudioCodecEnum> supportedAudioCodec;
		
		private AudioFormatEnum(String format, Set<AudioCodecEnum> supportedAudioCodec) {
			this.format = format;
			this.supportedAudioCodec = supportedAudioCodec;
		}

		public String getFormat() {
			return format;
		}

		public Set<AudioCodecEnum> getSupportedAudioCodec() {
			return supportedAudioCodec;
		}
	}
	
	public enum VideoCodecEnum {
		COPY, H264, H265;
	}
	
	public enum VideoProfileEnum {
		BASE_LINE, MAIN, HIGH;
	}
	
	public enum AudioCodecEnum {
		AAC, MP3, PCM_ALAW, AMRWB, PCM_S16LE, VORBIS, FLAC;
	}
	
	public enum AudioSampleFormatEnum {
		U8("u8"), S16("s16"), S32("s32"), FLT("flt"), DBL("dbl"), 
		U8P("u8p"), S16P("s16p"), S32P("s32p"), FLTP("fltp"), 
		DBLP("dblp"), S64("s64"), S64P("s64p");
		
		private final String audioSampleFormat;
		
		private AudioSampleFormatEnum(String audioSampleFormat) {
			this.audioSampleFormat = audioSampleFormat;
		}

		public String getAudioSampleFormat() {
			return audioSampleFormat;
		}
	}
}
